﻿Imports Microsoft.VisualBasic

Public Class DBReceiptVoucherSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public ReceiptVoucherID As New TableField("ReceiptVoucherID", Data.SqlDbType.Int)
    Public Year As New TableField("Year", Data.SqlDbType.Int)
    Public ReceiptVoucherNo As New TableField("ReceiptVoucherNo", Data.SqlDbType.Int)
    Public ReceiptVoucherDate As New TableField("ReceiptVoucherDate", Data.SqlDbType.DateTime)
    Public ReceiptFrom As New TableField("ReceiptFrom", Data.SqlDbType.NVarChar)
    Public Amount As New TableField("Amount", Data.SqlDbType.Money)
    Public ReceiptBeingFor As New TableField("ReceiptBeingFor", Data.SqlDbType.NVarChar)
    Public IsCash As New TableField("IsCash", Data.SqlDbType.Bit)
    Public ChequeNo As New TableField("ChequeNo", Data.SqlDbType.NVarChar)
    Public ChequeDate As New TableField("ChequeDate", Data.SqlDbType.DateTime)
    Public ChequeBankName As New TableField("ChequeBankName", Data.SqlDbType.NVarChar)
    Public ChequeRemarks As New TableField("ChequeRemarks", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "ReceiptVoucherSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal ReceiptVoucherID As String = "", _
                                 Optional ByVal Year As String = "", _
                                 Optional ByVal ReceiptVoucherNo As String = "", _
                                 Optional ByVal ReceiptVoucherDate As String = "", _
                                 Optional ByVal ReceiptFrom As String = "", _
                                 Optional ByVal Amount As String = "", _
                                 Optional ByVal ReceiptBeingFor As String = "", _
                                 Optional ByVal IsCash As String = "", _
                                 Optional ByVal ChequeNo As String = "", _
                                 Optional ByVal ChequeDate As String = "", _
                                 Optional ByVal ChequeBankName As String = "", _
                                 Optional ByVal ChequeRemarks As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.ReceiptVoucherID.SetValue(ReceiptVoucherID, MyBase.FieldsArrayList)
        Me.Year.SetValue(Year, MyBase.FieldsArrayList)
        Me.ReceiptVoucherNo.SetValue(ReceiptVoucherNo, MyBase.FieldsArrayList)
        Me.ReceiptVoucherDate.SetValue(ReceiptVoucherDate, MyBase.FieldsArrayList)
        Me.ReceiptFrom.SetValue(ReceiptFrom, MyBase.FieldsArrayList)
        Me.Amount.SetValue(Amount, MyBase.FieldsArrayList)
        Me.ReceiptBeingFor.SetValue(ReceiptBeingFor, MyBase.FieldsArrayList)
        Me.IsCash.SetValue(IsCash, MyBase.FieldsArrayList)
        Me.ChequeNo.SetValue(ChequeNo, MyBase.FieldsArrayList)
        Me.ChequeDate.SetValue(ChequeDate, MyBase.FieldsArrayList)
        Me.ChequeBankName.SetValue(ChequeBankName, MyBase.FieldsArrayList)
        Me.ChequeRemarks.SetValue(ChequeRemarks, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
